package com.wqiuqiu.gulimall.secdkill.service;

import com.wqiuqiu.common.to.mq.SecdKillOrderTo;
import com.wqiuqiu.gulimall.secdkill.to.SecdKillRedisTo;

import java.util.List;

public interface SecdKillService {
    void uploadSeckillSku();

    /**
     * 获取当前时间的秒杀场次信息
     * @return
     */
    List<SecdKillRedisTo> getCurrentSeckillSessions();

    /**
     * 根据skuId得到商品的秒杀活动信息
     * @param skuId
     * @return
     */
    SecdKillRedisTo getSecdKillInfoBySkuId(Long skuId);

    /**
     * 创建秒杀订单
     * @param code
     * @param killId
     * @param num
     * @return
     */
    SecdKillOrderTo kill(String code, String killId, int num);
}
